<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE HTML>
<html lang="zh-CN">
<head>
	<meta charset="UTF-8">
	<title>凯盛项目管理系统</title>
	<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css" />
	<script type="text/javascript" src="js/jquery.js"></script>
	<script type="text/javascript" src="js/bootstrap.min.js"></script>
	<style type="text/css">
		body{
			background-image:url(img/bb.jpg);
			background-repeat:repeat-x;
		}
	</style>
</head>
<body class="body">
	<%@ include file="include/main-top.jsp" %>
	<div class="container">
	  <div class="row">
		<jsp:include page="include/left.jsp">
			<jsp:param value="idea" name="tag"/>
		</jsp:include>
		<div class="span9">
			<form action="idea.jspx?m=addidea" method="post">
		        <fieldset>
		          <legend>发表新想法</legend>
		          <c:if test="${param.state == '10000' }">
						<div id="addemp" class="alert alert-info fade in" >
				            <a href="#" data-dismiss="alert" class="close">×</a>
				            <strong>恭喜您,添加新想法成功!</strong>
				        </div>
					</c:if>
		          <div class="control-group">
		            <label for="input01" class="control-label">标题</label>
		            <div class="controls">
		              <input type="text" x-webkit-speech="undefined" id="input01" class="span9" name="ideatitle">
		            </div>
		          </div>
				  <div class="control-group">
		            <label for="input01" class="control-label">内容</label>
		            <div class="controls">
		              <textarea rows="15" id="content_1" class="span9"  name="ideacontent" style="width:700px;height:300px;"></textarea>
		              <p>

				您当前输入了 <span class="word_count1">0</span> 个文字。<br />

				您当前输入了 <span class="word_count2">0</span> 个文字。

			</p>
		              
		            </div>
		          </div>
		
		          <div class="form-actions">
		            <button class="btn btn-primary" type="submit" onclick="checkSubmit()">保存</button>
		            <a class="btn" href="idea.jspx?m=jump2idea&projectid=${pid }">返回</a>
		          </div>
		        </fieldset>
		      </form>
			</div>
	  </div>
	</div>
	<script type="text/javascript" charset="utf-8" src="kindeditor/kindeditor.js"></script><!-- 添加kindeditor的引用 -->    
	<script type="text/javascript"> 
		KindEditor.ready(function(K) {
		K.create("#content_1",
								{

									items : [ 'fontname', 'fontsize', '|',
											'forecolor', 'hilitecolor', 'bold',
											'italic', 'removeformat', '|',
											'emoticons', ],
						afterChange : function() {
							K('.word_count1').html(this.count());

							K('.word_count2').html(
							this.count('text'));
										
						if (this.count('text') > 140) {
							alert("最多只能输入140个字符");
							var a = $("#content_1").val();
							a = $("#content_1").val().substring(0, 140);
							return false;
						}
					}
				});
			});
	
	</script>
	
	
</body>

</html>